/*
 * Copyright (C) 2013
 * Shopping
 */
package com.mshopping.app.http;


/**
 * This class is used for ...
 * 
 * @author liuhuan
 * @version 1.0, 2013-9-1 下午7:50:54
 */
public class ShoppingRestClient {
	private static final String BASE_URL = "http://api.twitter.com/1/";

	private static AsyncHttpClient client = new AsyncHttpClient();

	public static void get(String url, RequestParams params, AsyncHttpResponseHandler responseHandler) {
		client.get(getAbsoluteUrl(url), params, responseHandler);
	}

	public static void post(String url, RequestParams params, AsyncHttpResponseHandler responseHandler) {
		client.post(getAbsoluteUrl(url), params, responseHandler);
	}

	private static String getAbsoluteUrl(String relativeUrl) {
		return BASE_URL + relativeUrl;
	}
}
